package com.itheima.homework;

import java.util.Scanner;

public class test05 {
    public static void main(String[] args) {
        Scanner sc =new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String s = sc.next();

        char[] chs= s.toCharArray();
        int numcount = 0;
        int count = 0;
        for (int i = 0; i < chs.length; i++) {
            char c = chs[i];
            if(c>='a'&&c<='z'){
                count++;
            }else if(c>='A'&&c<='Z'){
                count++;
            }else if (c>='0'&&c<='9'){
                numcount++;
            }
        }
        System.out.println("字母:"+count+"个,"+"数字:"+numcount+"个.");
    }
}
